2025-09-30
First hour
Hello, I’m healthiar!
healthiar function examples
Outlook
Q & A
Break
Second hour
Hands-on mock case studies
Q & A
healthiar!healthiar in numbers1 purpose - to help you quantify and monetize the attributable burden of disease
3 dimensions - health, monetization, social aspects
19 functions
> 1000 calculation pathways
60000 (simple) assessments per second
healthiar overviewhealthiar overviewhealthiar overviewattribute_health() with RRattribute_health() with RR 1/3Goal: attribute COPD cases to PM2.5 air pollution exposure
Tip
healthiar comes with some example data that start with exdat_ that allow you to test functions.
results_pm_copd <- attribute_health(
erf_shape = "log_linear",
rr_central = exdat_pm$relative_risk,
rr_lower = exdat_pm$relative_risk_lower,
rr_upper = exdat_pm$relative_risk_upper,
rr_increment = 10,
exp_central = exdat_pm$mean_concentration,
cutoff_central = exdat_pm$cut_off_value,
bhd_central = exdat_pm$incidence
) attribute_health() with RR 2/3attribute_health() outputs two lists (“folders”)
health_main contains the main results
health_detailed contains more detailed results and other assessment details in sub-lists (“sub-folders”)
Tip
Other healthiar functions also create ..._main & ..._detailed folders
| impact_rounded | impact | pop_fraction | erf_ci | rr | exp | bhd |
|---|---|---|---|---|---|---|
| 3502 | 3501.962 | 0.1138961 | central | 1.369 | 8.85 | 30747 |
compare() two scenarioscompare() two scenarios 1/2Goal: compare attributable health impacts in two (policy) scenarios
attribute_health() to calculate burden of scenarios 1 & 2compare() to compare scenarios 1 & 2compare() two scenarios 2/2| impact | impact_rounded | impact_scen_1 | impact_scen_2 | bhd | exp_category | exp_length | exp_type | exp_scen_1 | exp_scen_2 |
|---|---|---|---|---|---|---|---|---|---|
| 731.5956 | 732 | 2349.958 | 1618.362 | 25000 | 1 | 1 | population_weighted_mean | 8.85 | 6 |
attribute_health() across multiple geographic unitsattribute_health() across multiple geographic units 1/3Goal: attribute disease cases to PM2.5 exposure in multiple geographic units, such as municipalities, provinces, countries, …
results_iteration <- attribute_health(
geo_id_micro = c("Zürich", "Basel", "Geneva", "Ticino", "Jura"),
geo_id_macro = c("German","German","French","Italian","French"),
erf_shape = "log_linear",
rr_central = 1.369,
rr_increment = 10,
cutoff_central = 5,
exp_central = c(11, 11, 10, 8, 7),
bhd_central = c(4000, 2500, 3000, 1500, 500)
)Here the we want to determine results by canton and then aggregate them by language region ("German", "French", "Italian")
attribute_health() across multiple geographic units 2/3| geo_id_micro | geo_id_macro | impact_rounded |
|---|---|---|
| Zürich | German | 687 |
| Basel | German | 429 |
| Geneva | French | 436 |
| Ticino | Italian | 135 |
| Jura | French | 30 |
attribute_health() across multiple geographic units 3/3| geo_id_macro | impact_rounded | erf_ci | exp_ci | bhd_ci |
|---|---|---|---|---|
| German | 1116 | central | central | central |
| French | 466 | central | central | central |
| Italian | 135 | central | central | central |
| French | 466 | central | central | central |
Tip
The main output contains aggregated results if available, or disaggregated results if no aggregation ID was provided
summarize_uncertainty()summarize_uncertainty() 1/4If we add 95% confidence intervals to attribute_health() …
… then the folder health_detailed contains all different uncertainty combinations:
| erf_ci | exp_ci | bhd_ci | impact_rounded | rr | exp | bhd |
|---|---|---|---|---|---|---|
| central | central | central | 3502 | 1.369 | 8.85 | 30747 |
| lower | central | central | 1252 | 1.114 | 8.85 | 30747 |
| upper | central | central | 5474 | 1.664 | 8.85 | 30747 |
| central | central | lower | 3189 | 1.369 | 8.85 | 28000 |
| lower | central | lower | 1140 | 1.114 | 8.85 | 28000 |
| upper | central | lower | 4985 | 1.664 | 8.85 | 28000 |
| central | central | upper | 3645 | 1.369 | 8.85 | 32000 |
| lower | central | upper | 1303 | 1.114 | 8.85 | 32000 |
| upper | central | upper | 5697 | 1.664 | 8.85 | 32000 |
| central | lower | central | 2765 | 1.369 | 8.00 | 30747 |
| lower | lower | central | 980 | 1.114 | 8.00 | 30747 |
| upper | lower | central | 4356 | 1.664 | 8.00 | 30747 |
| central | lower | lower | 2518 | 1.369 | 8.00 | 28000 |
| lower | lower | lower | 892 | 1.114 | 8.00 | 28000 |
| upper | lower | lower | 3967 | 1.664 | 8.00 | 28000 |
| central | lower | upper | 2877 | 1.369 | 8.00 | 32000 |
| lower | lower | upper | 1020 | 1.114 | 8.00 | 32000 |
| upper | lower | upper | 4533 | 1.664 | 8.00 | 32000 |
| central | upper | central | 4468 | 1.369 | 10.00 | 30747 |
| lower | upper | central | 1616 | 1.114 | 10.00 | 30747 |
| upper | upper | central | 6911 | 1.664 | 10.00 | 30747 |
| central | upper | lower | 4069 | 1.369 | 10.00 | 28000 |
| lower | upper | lower | 1471 | 1.114 | 10.00 | 28000 |
| upper | upper | lower | 6294 | 1.664 | 10.00 | 28000 |
| central | upper | upper | 4651 | 1.369 | 10.00 | 32000 |
| lower | upper | upper | 1682 | 1.114 | 10.00 | 32000 |
| upper | upper | upper | 7193 | 1.664 | 10.00 | 32000 |
summarize_uncertainty() 2/4Goal: perform a Monte Carlo simulation to obtain summary uncertainty confidence intervals that combine uncertainty in different input data
Step 1: Use attribute_health() with uncertainty in ≥ 2 function arguments
summarize_uncertainty() 3/4| impact_ci | impact | impact_rounded |
|---|---|---|
| central_estimate | 3136.993 | 3137 |
| lower_estimate | 1537.385 | 1537 |
| upper_estimate | 5676.227 | 5676 |
summarize_uncertainty() 4/4| erf_ci | exp_ci | bhd_ci | impact_rounded | rr | exp | bhd |
|---|---|---|---|---|---|---|
| central | central | central | 5732 | 1.462496 | 10.169416 | 32127.59 |
| central | central | central | 3603 | 1.521621 | 7.911264 | 31318.83 |
| central | central | central | 4634 | 1.496932 | 8.774451 | 32812.33 |
| central | central | central | 2478 | 1.236879 | 9.054176 | 30007.59 |
| central | central | central | 3191 | 1.307063 | 9.020706 | 31257.61 |
| central | central | central | 3223 | 1.356192 | 8.512348 | 31754.01 |
| central | central | central | 3457 | 1.335157 | 9.418368 | 28834.70 |
| central | central | central | 2104 | 1.205938 | 8.744307 | 31070.10 |
| central | central | central | 2759 | 1.293466 | 8.644376 | 30822.27 |
| central | central | central | 2708 | 1.369631 | 8.044059 | 29659.24 |
| central | central | central | 4715 | 1.476130 | 9.283572 | 30688.80 |
| central | central | central | 2293 | 1.266201 | 8.123483 | 32268.00 |
| central | central | central | 5511 | 1.565692 | 9.435253 | 30564.39 |
| central | central | central | 1681 | 1.220164 | 7.876042 | 30226.44 |
| central | central | central | 1739 | 1.196227 | 8.373347 | 29645.66 |
| central | central | central | 2700 | 1.285776 | 8.672201 | 30618.67 |
| central | central | central | 3778 | 1.449824 | 8.667627 | 29662.75 |
| central | central | central | 3318 | 1.322765 | 9.046383 | 31000.83 |
| central | central | central | 2585 | 1.222993 | 9.448868 | 30176.27 |
| central | central | central | 3838 | 1.414973 | 8.716984 | 31710.98 |
| central | central | central | 6010 | 1.597893 | 9.638799 | 30756.55 |
| central | central | central | 5121 | 1.448811 | 9.864133 | 31034.71 |
| central | central | central | 2718 | 1.329628 | 8.382055 | 29591.60 |
| central | central | central | 2542 | 1.279985 | 8.520498 | 30542.15 |
| central | central | central | 2665 | 1.234510 | 9.037271 | 32682.35 |
| central | central | central | 1755 | 1.143348 | 9.277425 | 31509.66 |
| central | central | central | 4719 | 1.517077 | 8.941018 | 31152.00 |
| central | central | central | 5712 | 1.608763 | 9.226419 | 31374.23 |
| central | central | central | 4765 | 1.647204 | 8.661057 | 28534.14 |
| central | central | central | 3823 | 1.434593 | 8.834073 | 29583.24 |
| central | central | central | 2015 | 1.189432 | 8.774213 | 31791.97 |
| central | central | central | 5336 | 1.523692 | 9.280948 | 32342.64 |
| central | central | central | 3128 | 1.389938 | 8.162300 | 31633.04 |
| central | central | central | 2991 | 1.539019 | 7.437381 | 29982.26 |
| central | central | central | 3202 | 1.264264 | 9.618489 | 31191.94 |
| central | central | central | 2982 | 1.244678 | 9.641836 | 30861.85 |
| central | central | central | 1525 | 1.117177 | 9.518233 | 31236.91 |
| central | central | central | 1735 | 1.144898 | 9.332677 | 30461.48 |
| central | central | central | 5060 | 1.599173 | 8.624380 | 32339.76 |
| central | central | central | 5637 | 1.592109 | 9.465788 | 30058.56 |
| central | central | central | 4861 | 1.746363 | 8.229324 | 29502.68 |
| central | central | central | 2975 | 1.293848 | 8.888864 | 31207.69 |
| central | central | central | 2782 | 1.242423 | 9.565886 | 29482.27 |
| central | central | central | 1848 | 1.186965 | 8.538280 | 31400.12 |
| central | central | central | 2579 | 1.262943 | 8.848151 | 30021.75 |
| central | central | central | 4492 | 1.493217 | 8.894856 | 31072.59 |
| central | central | central | 3237 | 1.357960 | 8.623589 | 30839.80 |
| central | central | central | 2792 | 1.293426 | 8.720863 | 30578.25 |
| central | central | central | 2952 | 1.409966 | 8.048208 | 29688.17 |
| central | central | central | 5411 | 1.567719 | 9.337891 | 30536.99 |
| central | central | central | 3996 | 1.446675 | 8.702427 | 31268.44 |
| central | central | central | 3661 | 1.399679 | 8.826942 | 30316.47 |
| central | central | central | 2864 | 1.257943 | 9.117803 | 31757.71 |
| central | central | central | 2879 | 1.357981 | 8.300835 | 29972.25 |
| central | central | central | 4968 | 1.451873 | 10.009305 | 29159.00 |
| central | central | central | 3513 | 1.340506 | 9.137586 | 30763.13 |
| central | central | central | 2389 | 1.240475 | 8.876587 | 29806.86 |
| central | central | central | 4056 | 1.498765 | 8.591182 | 29989.67 |
| central | central | central | 3997 | 1.368704 | 9.493419 | 30390.03 |
| central | central | central | 4253 | 1.414422 | 9.236187 | 31137.12 |
| central | central | central | 2407 | 1.237385 | 8.963959 | 29726.87 |
| central | central | central | 2932 | 1.287537 | 8.873243 | 31440.49 |
| central | central | central | 3049 | 1.260693 | 9.421512 | 31316.64 |
| central | central | central | 857 | 1.078443 | 8.817682 | 30172.27 |
| central | central | central | 4143 | 1.373768 | 9.598045 | 30495.46 |
| central | central | central | 2750 | 1.236879 | 9.452916 | 30447.90 |
| central | central | central | 3112 | 1.318392 | 8.854116 | 30793.45 |
| central | central | central | 2951 | 1.262880 | 9.158913 | 31903.06 |
| central | central | central | 4421 | 1.471209 | 8.885705 | 31737.16 |
| central | central | central | 3268 | 1.308333 | 9.261365 | 30199.23 |
| central | central | central | 3146 | 1.356827 | 8.746336 | 29122.17 |
| central | central | central | 3985 | 1.474773 | 8.590024 | 30608.95 |
| central | central | central | 4843 | 1.435846 | 9.572380 | 31765.57 |
| central | central | central | 4375 | 1.502303 | 8.985174 | 29217.65 |
| central | central | central | 4704 | 1.460520 | 9.738521 | 28631.75 |
| central | central | central | 2906 | 1.341438 | 8.341227 | 31089.41 |
| central | central | central | 4182 | 1.549701 | 8.636472 | 28396.42 |
| central | central | central | 2777 | 1.282869 | 8.752270 | 31122.64 |
| central | central | central | 2721 | 1.253935 | 9.026258 | 31250.85 |
| central | central | central | 3036 | 1.298591 | 9.138925 | 29620.38 |
| central | central | central | 4520 | 1.483334 | 9.085931 | 30376.04 |
| central | central | central | 2349 | 1.215117 | 9.081671 | 30732.38 |
| central | central | central | 2044 | 1.178410 | 9.042366 | 31836.65 |
| central | central | central | 3899 | 1.398355 | 8.905416 | 31769.13 |
| central | central | central | 4555 | 1.452661 | 9.383542 | 30169.96 |
| central | central | central | 3722 | 1.444415 | 8.486740 | 30931.49 |
| central | central | central | 2782 | 1.323915 | 8.536976 | 29449.77 |
| central | central | central | 5009 | 1.521840 | 9.204557 | 30948.65 |
| central | central | central | 1551 | 1.151462 | 8.629601 | 31075.18 |
| central | central | central | 3527 | 1.314995 | 9.476953 | 30568.30 |
| central | central | central | 2546 | 1.243599 | 8.988530 | 30565.73 |
| central | central | central | 2280 | 1.226581 | 8.776856 | 30709.30 |
| central | central | central | 3767 | 1.394531 | 9.162430 | 29141.71 |
| central | central | central | 3209 | 1.377354 | 8.523845 | 30078.43 |
| central | central | central | 2024 | 1.181774 | 8.956203 | 31649.47 |
| central | central | central | 2836 | 1.235014 | 9.633116 | 30443.77 |
| central | central | central | 962 | 1.101541 | 8.349209 | 30175.87 |
| central | central | central | 4895 | 1.596689 | 8.666183 | 31050.85 |
| central | central | central | 2354 | 1.310017 | 7.882021 | 31433.46 |
| central | central | central | 3035 | 1.383293 | 8.134663 | 31381.57 |
attribute_health() with RR and user-defined ERFattribute_health() with RR and user-defined ERF 1/2Goal: attribute COPD cases to air pollution exposure by applying a user-defined exposure response function (e.g. MR-BRT curves from Global Burden of Disease study)
Any function of the form intercept + a x c^1 + b x c^2 + …
Any other (non-linear) function of the function type, as obtained from e.g. splinefun() or approxfun()
attribute_health() with RR and user-defined ERF 2/2attribute_health() with RR and exposure distributionattribute_health() with RR and exposure distributionGoal: attribute COPD cases to air pollution exposure categories
| impact_rounded | pop_fraction | exp | prop_pop_exp | rr_at_exp |
|---|---|---|---|---|
| 2177 | 0.0707956 | 5, 6, 7, 8, 9, 10 | 0.2, 0.1, 0.2, 0.3, 0.1, 0.1 | 1, 1.03190649221009, 1.06483100866533, 1.09880603094837, 1.13386507701522, 1.1700427342623 |
attribute_health() with ARattribute_health() with AR 1/2Goal: attribute cases of high annoyance (HA) to noise exposure
| Exposure category | Exposure mean | Population exposed |
|---|---|---|
| exp < 55 | 4’268’785 | |
| 55 ≤ exp < 60 | 57.5 | 387’500 |
| 60 ≤ exp < 65 | 62.5 | 286’000 |
| 65 ≤ exp < 70 | 67.5 | 191’800 |
| 70 ≤ exp < 75 | 72.5 | 72’200 |
| 75 ≤ exp | 77.5 | 7’700 |
attribute_health() with AR 2/2| approach_risk | exp_category | impact |
|---|---|---|
| absolute_risk | 1, 2, 3, 4, 5 | 174231.8 |
| exp_category | exp | pop_exp | impact |
|---|---|---|---|
| 1 | 57.5 | 387500 | 49674.594 |
| 2 | 62.5 | 286000 | 50788.595 |
| 3 | 67.5 | 191800 | 46813.105 |
| 4 | 72.5 | 72200 | 23657.232 |
| 5 | 77.5 | 7700 | 3298.314 |
healthiar functionshealthiar functionsattribute_lifetable() for YLLattribute_health() for YLD (using the dw & duration arguments)get_daly() as the sum of YLL and YLDmonetize() monetizes (attributable) health impactscba() performs a cost-benefit analysis (CBA)multiexpose() considers exposure to 2 exposures (e.g. two different air pollutants) at the same time to quantify the attributable health impactsprepare_exposure() calculates (population-weighted) mean exposure by combining spatial exposure geographic units datasocialize() determines burden attributable to differences in a social indicatorattribute_mod() modifies an existing attribute_health() assessmentprepare_mdi() creates the BEST-COST MDI (Multidimensional Deprivation Index)healthiar is publicly available on this GitHub page
Python version coming out later in 2026
Package submitted to CRAN
healthiar might be expanded in the future (if funding available)
Introduction of exercises (ca. 5 min)
Time for exercises in small groups (ca. 25 min)
Presentation of solutions in plenum (ca. 10 min)
Q & A (remaining time, ca. 15 min)
Run the following commands below in RStudio to install healthiar (also found at the start of the exercises)
install.packages("remotes") remotes::install_github(repo = "SwissTPH/healthiar", build_vignettes = TRUE) library(healthiar)
Happy coding!
For additional function examples please see the function documentations and the package vignette.
The next slides will show you how to access them.
healthiar in RStudio 1/3Figure: Landing page of the healthiar package in RStudio, where you find the package vignettes and function documentation.
healthiar in RStudio 2/3Figure: Intro to healthiar vignette (= detailed guide to the package)
healthiar in RStudio 3/3Figure: Help page of attribute_health()
Visualization is out of scope of healthiar. You can visualize in
ggplot2 package (online book by the creator)